package system;

import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.net.URL;

import org.codehaus.jackson.JsonNode;
import org.codehaus.jackson.map.ObjectMapper;

public class JSONURL {
	String URLString;
	//JSONObject URLjson;

	public JSONURL(String url){
		URLString=url;
	}

	
	public void getMetrics(Metric metric){
		//URLjson.getJSONObject(this.openURL(URLString));
	}
	
	
	private static String openURL(String urlString){
		String ret = null;

		try{
			URL url = new URL(urlString);
			BufferedReader br = new BufferedReader(new InputStreamReader(url.openStream()));

			ret = br.readLine();
		}
		catch(Exception e){
			e.printStackTrace();
		}

		return ret;
	}
}


